<!DOCTYPE html>
<html lang="en">

	<head>
		<!-- BEGIN META -->
		<?php $this->load->view('Public/headmeta.html');?>
		<!-- END META -->

		<!-- BEGIN STYLESHEET-->
		<?php $this->load->view('Public/headcss.html');?>
		<!-- END STYLESHEET-->
		<title>
			<?php echo $current['title']."-".$setting['title'];?>
		</title>

	</head>

	<body>
		<!-- BEGIN SECTION -->
		<section id="container">
			<!-- BEGIN HEADER -->
			<?php $this->load->view('Public/header.html');?>
			<!-- END HEADER -->
			<!-- BEGIN SIDEBAR -->
			<?php $this->load->view('Public/sidebar.html');?>
			<!-- END SIDEBAR -->
			<!-- BEGIN MAIN CONTENT -->
			<section id="main-content">
				<!-- BEGIN WRAPPER  -->
				<section class="wrapper">
					<!-- TOPMENU ROW  -->
					<?php $this->load->view('Public/topmenu.html');?>
					<!-- TOPMENU ROW  -->

					<!-- BEGIN ROW  -->
					<div class="row">
						<div class="col-lg-12">
							<section class="panel-bg">
								<header class="panel-heading">
									<span class="label label-primary"><?php echo $current['title'];?></span>
								</header>
								<div class="panel-body">
									<div class="form">
										<form class="cmxform form-horizontal tasi-form" id="articleForm" method="post" action="<?php echo site_url('Pkadmin/Article/update');?>" enctype="multipart/form-data">
											<div class="form-group">
												<label for="category_id" class="control-label col-sm-2">文章分类</label>
												<div class="col-sm-4">
													<select class="form-control" name="category_id">
														<option value="">文章分类</option>
														<?php foreach($category_list as $item):?>
														<option value="<?php echo $item['category_id'];?>" <?php if($item[ 'category_id'] == $article[ 'category_id']) echo 'selected="selected"';?>>
															<?php echo $item['category_name'];?>
														</option>
														<?php endforeach;?>
													</select>
												</div>
											</div>

											<div class="form-group">
												<label for="article_title" class="control-label col-sm-2">文章名称</label>
												<div class="col-sm-4">
													<input class="form-control" id="article_title" name="article_title" type="text" value="<?php echo $article['article_title'];?>">
												</div>
											</div>

											<div class="form-group">
												<label for="keywords" class="control-label col-sm-2">关键词</label>
												<div class="col-sm-4">
													<input class="form-control" id="keywords" name="keywords" type="text" value="<?php echo $article['keywords'];?>">
												</div>
											</div>

											<div class="form-group">
												<label for="article_desc" class="control-label col-sm-2">文章摘要</label>
												<div class="col-sm-4">
													<textarea class="form-control" id="article_desc" name="article_desc" rows="5" placeholder="文章摘要"><?php echo $article['article_desc'];?></textarea>
												</div>
											</div>

											<div class="form-group last">
												<label for="article_pic" class="control-label col-sm-2">文章插图</label>
												<div class="col-sm-3">
													<div class="fileupload fileupload-new" data-provides="fileupload">
														<div class="fileupload-new thumbnail">
															<img src="<?php if(!empty($article['article_pic'])){echo base_url($article['article_pic']);}else{echo base_url('Public/img/no_image.png');}?>">
														</div>
														<div class="fileupload-preview fileupload-exists thumbnail">
														</div>
														<div>
															<span class="btn btn-white btn-file">
																<span class="fileupload-new">
																	<i class="fa fa-paper-clip"></i> 选择图片
																</span>
															<span class="fileupload-exists">
																<i class="fa fa-undo"></i> 重置
															</span>
															<input type="file" class="default" name="article_pic">
															</span>
															<a href="#" class="btn btn-danger fileupload-exists" data-dismiss="fileupload">
																<i class="fa fa-trash"></i> 删除
															</a>
														</div>
													</div>
												</div>
											</div>

											<div class="form-group">
												<label for="content" class="control-label col-sm-2">文章内容</label>
												<div class="col-sm-8">
													<textarea class="wysihtml form-control" id="content" name="content" rows="8"><?php echo $article['content'];?></textarea>
												</div>
											</div>

											<div class="form-group">
												<input type="hidden" name="id" id="id" value="<?php echo $article['article_id'];?>">
												<div class="col-sm-offset-2 col-sm-10">
													<button class="btn btn-primary" type="submit">保存</button>
													<button class="btn btn-default" type="reset">重置</button>
												</div>
											</div>
										</form>
									</div>
								</div>
							</section>
						</div>
					</div>
					<!-- END ROW  -->
				</section>
				<!-- END WRAPPER  -->
			</section>
			<!-- END MAIN CONTENT -->
			<!-- BEGIN FOOTER -->
			<?php $this->load->view('Public/footer.html');?>
			<!-- END FOOTER -->
		</section>
		<!-- END SECTION -->
		<!-- BEGIN JS -->
		<?php $this->load->view('Public/footjs.html');?>
		<script src="<?php echo base_url('Public/js/pkadmin/article.js');?>"></script>
		<!-- PKADMIN ARTICLE JS -->
		<!-- END JS -->
	</body>

</html>